/**
 * Created by hms on 2020-11-02.
 */
import { ROAST_CONFIG } from '../config.js';

export default{
    getGroupList:function(data){
		let timestamp=Date.parse(new Date());
		data.random_id=timestamp;
        return axios.get(ROAST_CONFIG.API_URL+'/grouplist',{ params : data});
    },
    editGroup:function(data){
        return axios.post(ROAST_CONFIG.API_URL+'/editgroup',qs.stringify(data),{
            headers: {'Content-Type': 'application/x-www-form-urlencoded'}
        });
    },
    getGroupInfo:function(data){
		let timestamp=Date.parse(new Date());
		data.random_id=timestamp;
        return axios.get(ROAST_CONFIG.API_URL+'/groupinfo',{
            params:data
        });
    },
    delGroup:function(data){
        return axios.get(ROAST_CONFIG.API_URL+'/delgroup',{
            params:data
        });
    }
}
